<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>添加文章</title>
		<%@include file="/common/common.jsp"%>
		<script type="text/javascript" src="${ctx}/script/jquery.MetaData.js"></script>
		<script type="text/javascript"
			src="${ctx}/script/jquery.MultiFile.pack.js"></script>
		<script type="text/javascript" src="${ctx}/script/page.js"></script>
		<script type="text/javascript" src="${ctx}/script/article.js"></script>
		<script type="text/javascript" src="${ctx}/script/FilterHtml.js"></script>
		<script type="text/javascript">
			function sub(){
			
		         var title = document.getElementById('title').value;
                 if(title==""||title==null){
                     alert("请输入文章标题。");
                     document.form1.title.focus();
                     return false;
                 }

                 var keywords=document.getElementById('keywords').value;
                 if(keywords==""||keywords==null){
                     alert("请输入文章关键字。");
                     document.form1.keywords.focus();
                     return false;
                 }

                 
                var source=document.getElementById('source').value;
                if (source==null||source=="") {
                    alert("请输入文章来源。");
                    document.form1.source.focus();
                    return false;
                }
                var author=document.getElementById('author').value;
                if(author==null||author==""){
                    alert("请输入文章作者名。");
                    document.form1.author.focus();
                    return false;
                }
                return true;
		    }
		    function cls(){
                with (event.srcElement)
                if(value=="文章标题要简洁")
                    value="";
            }
            function res(){
            	 with (event.srcElement)
                if(value=="")
                	value="文章标题要简洁";     
            }
		</script>
	</head>
	<body style="background-image: none;">
		<div class="content-box-header">

			<h3>
				添加文章
			</h3>
		</div>

		<!-- End #tab1 -->

		<div class="tab-content" id="tab2">

			<fieldset>
				<form name="form1" action="issue" method="post"
					enctype="multipart/form-data" onsubmit="return sub()">

					<input type="hidden" name="ifauthority" value="1" />
					<input type="hidden" name="consult" value="1" />


					<p>
						<label style="color: red;">
							文章标题：
						</label>
						<input class="text-input small-input" type="text" id="title"
							name="title" value="文章标题要简洁" onfocus="cls()" onblur="res()" />
						<select id="color" name="color">
							<option value="0">
								默认
							</option>
							<option value="1">
								红色
							</option>
							<option value="2">
								绿色
							</option>
							<option value="3">
								蓝色
							</option>
						</select>
						<span class="input-notification attention png_bg">输入文章的标题信息</span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
					</p>
					<p>
						<label>
							&nbsp;&nbsp;&nbsp;关键字：
						</label>
						<input class="text-input Medium-input" type="text" id="keywords"
							name="keywords" />
						<span class="input-notification information png_bg">文章的关键字
							信息</span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
					</p>
					<p>
						<label>
							文章来源：
						</label>
						<input class="text-input Medium-input" type="text" id="source"
							name="source" />
						<span class="input-notification information png_bg">文章的来源信息,如：原创、转载等</span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
					</p>
					<p>
						<label>
							&nbsp;&nbsp;&nbsp;发布者：
						</label>
						<input class="text-input Medium-input" type="text" id="author"
							name="username" />
						<span class="input-notification information png_bg">文章的发布人或者是作者</span>
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
					</p>

					<p>
						<label style="color: red;">
							首页显示：
						</label>
						<select id="top" name="grade">
							<option value="0">
								否
							</option>
							<option value="1">
								是
							</option>
						</select>
						<span class="input-notification attention png_bg">设置这篇文章是否在首页显示</span>
						<br />
					</p>
					<p>
						<label style="color: red;">
							文章显示：
						</label>
						<select id="show" name="show">
							<option value="0">
								否
							</option>
							<option value="1">
								是
							</option>
						</select>
						<span class="input-notification attention png_bg">设置这篇文章是否在网站中显示</span>
						<br />
					</p>
					<p>
						<label style="color: red;">
							文章分类：
						</label>

						<select name="typeid" id="typeid">

							<s:iterator id="t" value="#request.TYPE_LIST">
								<option value="${requestScope.t.articleTypeId}">
									${requestScope.t.articleTypeName}
								</option>
							</s:iterator>

						</select>
						<span class="input-notification attention png_bg">文章分类</span>
						<br />
					</p>

					<p>
						<label style="color: red;">
							附件(包括图片,音频,视频,压缩文件)：
						</label>
						请选择要上传的文件：
						<input class="multi" maxlength="5" type="file" id="articlefile"
							name="upload" />
						<span class="input-notification information png_bg" id="tip">最多可以上传5个文件</span>
						<br />
					</p>

					<p>
						<label style="color: red;">
							文章内容：
						</label>
						<fck:editor instanceName="content" width="700" height="350">
						</fck:editor>

						<br />
					</p>
					<p>
						<input class="button" type="submit" value="保存" />
					</p>
				</form>
			</fieldset>

			<div class="clear"></div>
		</div>
		<div id="footer">
			<small> &#169; Copyright 2011 | Freedoms | <a href="#">Top</a>
			</small>
		</div>
	</body>
</html>
